package com.xx.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;


/**
 * Created by 石头哥哥 on 15/11/9.
 * PROJECT_NAME: springboot_test
 * PACKAGE_NAME: com.xx.boot
 * COMMENT :
 */
@SpringBootApplication
@ImportResource({"res/spring-context.xml"})
public class ServerServiceApplication extends SpringBootServletInitializer {

    /**
     * Configure the application. Normally all you would need to do it add sources (e.g.
     * config classes) because other settings have sensible defaults. You might choose
     * (for instance) to add default command line arguments, or set an active Spring
     * profile.
     *
     * @param builder a builder for the application context
     * @return the application builder
     * @see SpringApplicationBuilder
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(ServerServiceApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(ServerServiceApplication.class, args);
    }
}
